package cn.swust.designpatternlearningplatform.service;

import cn.swust.designpatternlearningplatform.common.Result.PageInfo;
import cn.swust.designpatternlearningplatform.domain.bo.StudentTopicTypeBo;
import cn.swust.designpatternlearningplatform.domain.bo.TopicWrongWithKnowledgePointBo;
import cn.swust.designpatternlearningplatform.domain.dto.TopicWrongDto;
import cn.swust.designpatternlearningplatform.domain.dto.TopicWrongPointLinkDto;
import cn.swust.designpatternlearningplatform.domain.entity.Topic;
import cn.swust.designpatternlearningplatform.event.TopicWrongEvent;

import java.util.List;

public interface TopicWrongService {
    /**
     * 获取用户的错题中与某个知识点关联的题目
     *
     * @param topicWrongWithKnowledgePointBo
     * @param studentTopicTypeBo
     * @return java.util.List<cn.swust.designpatternlearningplatform.domain.entity.Topic>
     * @author Tang
     * @date 2023/4/21 15:00
     **/
    List<TopicWrongDto> getWrongTopicInKnowledgePoint(PageInfo<TopicWrongDto> pageInfo,
                                                      TopicWrongWithKnowledgePointBo topicWrongWithKnowledgePointBo,
                                                      StudentTopicTypeBo studentTopicTypeBo);

    /**
     * 返回用户错题的总数量
     *
     * @param studentTopicTypeBo
     * @return java.lang.Integer
     * @author Tang
     * @date 2023/4/21 17:17
     **/
    Integer totalTopicWrong(StudentTopicTypeBo studentTopicTypeBo);

    /**
     * 获取用户在某知识点下的与知识点相关联的题目id
     *
     * @param topicWrongWithKnowledgePointBo
     * @return java.util.List<java.lang.Integer>
     * @author Tang
     * @date 2023/4/23 20:30
     **/
    Integer totalTopicWrongIdUnderPoint(TopicWrongWithKnowledgePointBo topicWrongWithKnowledgePointBo,
                                        StudentTopicTypeBo studentTopicTypeBo);


    /**
     * 获取学生知识点下的错题数量集合
     *
     * @param studentNumber
     * @param current
     * @param size
     * @return java.util.List<cn.swust.designpatternlearningplatform.domain.dto.TopicWrongPointLinkDto>
     * @author Tang
     * @date 2023/10/10 10:18
     **/
    List<TopicWrongPointLinkDto> getTopicPointLinkDto(String studentNumber, Integer current, Integer size);

    /**
     * 提交学生错题信息
     *
     * @param studentNumber
     * @param wrongEvents
     * @return void
     * @author Tang
     * @date 2023/9/23 10:27
     **/
    void submitTopicWrong(String studentNumber, List<TopicWrongEvent> wrongEvents);
}
